﻿using lingopen.Application;
using lingopen.AutoMapper;
using lingopen.Entity;
using lingopen.Entity.BLE;
using lingopen.Entity.System;
using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace lingopen.Application.BLE
{
    public class AddOrUpdateEmpCardInputBase : ValidationModel
    {
        [RequiredAttribute(ErrorMessage = "名称不能为空")]
        public string Name { get; set; }
        [RequiredAttribute(ErrorMessage = "编号不能为空")]
        public string Code { get; set; }

        /// <summary>
        /// 卡号
        /// </summary>
        [RequiredAttribute(ErrorMessage = "卡号不能为空")]
        public string MAC { get; set; }
        [RequiredAttribute(ErrorMessage = "类别不能为空")]
        public string TypeId { get; set; }
         
        public bool IsEnabled { get; set; }
        /// <summary>
        /// 电量
        /// </summary>
        public int Battery { get; set; }
        public string Description { get; set; }
    }

    [MapToType(typeof(BLE_Emp_Card))]
    public class AddEmpCardInput : AddOrUpdateEmpCardInputBase
    {
        public string CreateUserId { get; set; }
    }

    [MapToType(typeof(BLE_Emp_Card))]
    public class UpdateEmpCardInput : AddOrUpdateEmpCardInputBase
    {
        [RequiredAttribute(ErrorMessage = "{0}不能为空")]
        public string Id { get; set; }
    }
}
